package com.management.controller;


import com.management.controller.form.MemberForm;
import com.management.service.AccountRoleService;
import com.management.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import sun.management.counter.perf.PerfInstrumentation;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 龙世超
 * @since 2022-03-23
 */
@Api(tags = "用户角色相关")
@RestController
@RequestMapping("/accountRole")
public class AccountRoleController {

    @Resource
    private AccountRoleService accountRoleService;

    /**
     * 分页查询所有成员
     * @param memberForm 分页参数
     * @return
     */
    @ApiOperation("分页查询所有成员")
    @PostMapping("/getMemberByPage")
    public Result getAllMember(@RequestBody(required=false) MemberForm memberForm){

       Result result= accountRoleService.findAllMembers(memberForm);
        return result;
    }
}

